package com.shop.domain.pink;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>StorePinkConfig 实体类</p>
 * <p>Table: t_store_snap_pink_config - 拼团设置表</p>
 * @author generator
 * @date 2021-02-21 04:36:28
 */
@ApiModel("t_store_snap_pink_config 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_store_snap_pink_config")
@SQLDelete(sql = "update t_store_snap_pink_config set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class StoreSnapPinkConfig extends BaseDomain implements Serializable {


    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 中奖概率
	 */
    @ApiModelProperty("中奖概率")
	@Column(name = "zj_rate")
    private BigDecimal zjRate;


    /**
	 * 开团次数
	 */
    @ApiModelProperty("开团次数")
	@Column(name = "kaituan_cishu")
    private Integer kaituanCishu;

    /**
	 * 是否开启拼团 0 关闭 1开启
	 */
    @ApiModelProperty("是否开启拼团 0 关闭 1开启")
	@Column(name = "status")
    private Integer status;

    /**
	 * 拼团规格 
	 */
    @ApiModelProperty("拼团规格 ")
	@Column(name = "price")
    private BigDecimal price;

    /**
	 * 未拼中返利金额
	 */
    @ApiModelProperty("未拼中最低返利金额")
	@Column(name = "min_ret_price")
    private BigDecimal minRetPrice;

    /**
     * 未拼中返利金额
     */
    @ApiModelProperty("未拼中最低返利金额")
    @Column(name = "max_ret_price")
    private BigDecimal maxRetPrice;

    /**
	 * 开始时间
	 */
    @ApiModelProperty("开始时间")
	@Column(name = "start_time")
    private String startTime;

    /**
	 * 结束时间
	 */
    @ApiModelProperty("结束时间")
	@Column(name = "end_time")
    private String endTime;


    /**
	 * 是否删除 0 未删除 1已删除
	 */
    @ApiModelProperty("是否删除 0 未删除 1已删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}